package com.suo.spring.test;

import com.suo.spring.annotation.Autowired;
import com.suo.spring.annotation.Component;

@Component
public class Service {

    @Autowired
    private Dao dao;

    public Service() {
        System.out.println("Service被初始化了");
    }

    public void service() {
        System.out.println("service将会调用dao方法");
        dao.dao();
    }
}
